﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSE.Framework.Configuration;
using System.Configuration;

namespace PSE.Framework.ProviderLoader.Configuration
{
    [ConfigurationCollection(typeof(ProviderConfigurationElement), AddItemName = "provider", CollectionType = ConfigurationElementCollectionType.BasicMap)]
    public class ProviderConfigurationElementCollection : ConfigurationCollection<ProviderConfigurationElement>
    {
        public void Add(ProviderConfigurationElement item)
        {
            base.BaseAdd(item);
        }

        public void Remove(string productId)
        {
            if (base.BaseGet(productId) != null) //se existe
                base.BaseRemove(productId);
        }
    }
}
